<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="icon" href="/static/favicon.ico">
  <title>project</title>
  <style>
    * {

      margin: 0;
      padding: 0;
    }
  </style>
</head>

<body>
  <div id="app"></div>
  <!-- built files will be auto injected -->
</body>
<script>
  // 屏幕宽度基准值
  const baseWidth = 1800;
  // 基准字体大小
  const baseFontSize = 18;
  function setRootFontSize() {
    const currentWidth = window.innerWidth;
    const scaleFactor = currentWidth / baseWidth;
    const newFontSize = baseFontSize * scaleFactor;
    document.documentElement.style.fontSize = newFontSize + 'px';
  }
  window.addEventListener('resize', setRootFontSize);
  window.addEventListener('DOMContentLoaded', setRootFontSize);
</script>

</html>
